package com.z.admin.service.impl;

import com.z.admin.entity.Tag;
import com.z.admin.dao.TagMapper;
import com.z.admin.service.ITagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.z.common.base.Results;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author z
 * @since 2022-04-11
 */
@Service
public class TagServiceImpl extends ServiceImpl<TagMapper, Tag> implements ITagService {
    @Resource
    private TagMapper tagMapper;

    @Override
    public Results findPageByMap(Map<String, Object> map, Integer offset, Integer limit) {
        return Results.success(tagMapper.conutAll(), tagMapper.findTagByPage(offset, limit));
    }
}
